package com.apesource.mallproject.service.ServiceImpl;

import com.apesource.mallproject.dao.IAdTypeDao;
import com.apesource.mallproject.pojo.AdType;
import com.apesource.mallproject.service.IAdTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigInteger;
import java.util.List;

@Service
public class AdTypeServiceImpl implements IAdTypeService {

    @Autowired
    private IAdTypeDao iAdTypeDao;

    @Override
    public List<AdType> queryAll() {
        return iAdTypeDao.queryAll();
    }

    @Override
    public void insertAd(String name, Integer status) {
        iAdTypeDao.insertAd(name, status);
    }

    @Override
    public void updateAd(String name, Integer status, BigInteger id) {
        iAdTypeDao.updateAd(name, status, id);
    }

    @Override
    public void delOne(BigInteger id) {
        iAdTypeDao.delBrand(id);
    }

    @Override
    public void batchDel(String[] ids) {
        iAdTypeDao.batchDelete(ids);

    }
}
